package com.linsen.core.redis.annotation;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * @author zhaoyong
 * @date 2023/3/28
 */
@Target(value = {ElementType.METHOD})
@Retention(value = RetentionPolicy.RUNTIME)
@Documented
public @interface Limit {
    /**
     * 倒计时
     *
     * @return
     */
    long timeout() default 1L;

    /**
     * 时间单位: 默认秒
     *
     * @return
     */
    TimeUnit unit() default TimeUnit.SECONDS;
}
